<?php

$toolbar    =new ToolBarHelper($act);
$toolbar->setSubmitAjax(true);
if($act=="add")
{
    $title = '[New Content]';
    $toolbar->SetTitle($title);
    $toolbar->Back(getUrlBack());
    $toolbar->Save('Save',2);
    $toolbar->Save('Save & Exit');
}
else if($act=="edit")
{
    $title = '[Edit Content]';
    $toolbar->SetTitle($title);
    $toolbar->Back(getUrlBack());
    $toolbar->Apply();
    $toolbar->Save();
}
else if($act=="photos")
{
    $title = '[Photos]';
    $toolbar->SetTitle($title);
    $toolbar->Back(getUrlBack());
    $toolbar->Apply();
}
else
{
    $toolbar->setSubmitAjax(false);
    $toolbar->Delete();
    if(count($contents)>0)
    {
        $toolbar->Apply();
    }    
    $toolbar->addNew('add','New product','idP='.$id);
}
?>